package br.fafica.poo2.rightcode.generico;

import java.util.ArrayList;

public class MetodosUteis {
	
	private static ArrayList <Object> totalObject = null;
	
	public static <T> void printClass(T tipo){
		System.out.println(tipo.getClass());
	}
	
	public static <T> String getArrayToString (ArrayList <T> tipo){
		String guardar = "";
		for (T t : tipo) {
			guardar+=t+"\n";
		}
		return guardar;
	}
	
	public static <T> void setArrays(ArrayList <T> tipo){
		
		if(totalObject == null) totalObject = new ArrayList<>();
		
		totalObject.addAll(tipo);
	}
	
	public static Integer getArraySize(){
		return totalObject.size();
	}
	
}
